#pragma once

#include "../umlmodel_global.h"

#include "MultiplicityElement.h"
#include "ObjectNode.h"

namespace uml {

/// <summary>
/// Pin
/// A Pin is an ObjectNode and MultiplicityElement that provides input values to an
/// Action or accepts output values from an Action.
/// </summary>
class UMLMODEL_EXPORT Pin : public MultiplicityElement, public ObjectNode {

public: // Constructors and destructors
    explicit Pin(const QString& umlType="uml::Pin");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// isControl getter
    /// Indicates whether the Pin provides data to the Action or just controls how the
    /// Action executes.
    /// </summary>
    bool isControl() const;

    /// <summary>
    /// isControl setter
    /// Indicates whether the Pin provides data to the Action or just controls how the
    /// Action executes.
    /// </summary>
    void setIsControl(bool value);

private: // Fields
    /// <summary>
    /// isControl
    /// Indicates whether the Pin provides data to the Action or just controls how the
    /// Action executes.
    /// </summary>
    const static bool isControl_default_;
    bool isControl_= isControl_default_;

};

} // namespace uml
